package org.finalministry.objects;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.vividsolutions.jts.geom.Geometry;

@XmlRootElement
public class Area extends FlagTagNoteAbleBase {
	private Long id;
	private Long congregationID;
	private String name;
	private String description;
	@XmlTransient
   @JsonIgnore
	private Geometry geometry;

	public Area() {

	}

	public Area(Long congregationID, String name, String description, Geometry geometry) {
		super();

		this.setCongregationID(congregationID);
		this.name = name;
		this.description = description;
		this.setGeometry(geometry);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@XmlTransient
	public Geometry getGeometry() {
		return geometry;
	}

	public void setGeometry(Geometry geometry) {
		this.geometry = geometry;
	}

	public Long getCongregationID() {
		return congregationID;
	}

	public void setCongregationID(Long congregationID) {
		this.congregationID = congregationID;
	}

   public String getGeometryAsString() {

      return geometry.toText();
   }
}
